Skip to content

Conversation

@rkistner
Copy link
Contributor

@rkistner rkistner commented Jul 17, 2025

This uses the persisted timestamp for last commit/keepalive to report replication issues in the diagnostics API.

If the replication stream is idle, a new keepalive should be performed once every minute. This means we cannot test more granular than that, but this should report cases where:

  1. The replication process is down completely.
  2. The replication process is active, but does not perform any new commits. One example of such a case is in [MongoDB] Fix resume token handling when no events are received #251.

However, this will not detect cases where the replication process makes progress but falls behind. For those cases, monitor the powersync_replication_lag_seconds metric instead.

This change also reduces the Postgres keepalive message interval from 5 minutes to 1 minute. We already have a different keepalive mechanism in MongoDB doing the same.

We exclude MySQL for this check for now, since we don't have a good keepalive mechanism for it yet.

@changeset-bot
Copy link

changeset-bot bot commented Jul 17, 2025

🦋 Changeset detected

Latest commit: 81f679c

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 11 packages
Name Type
@powersync/service-core Minor
@powersync/service-image Minor
@powersync/service-core-tests Patch
@powersync/service-module-core Patch
@powersync/service-module-mongodb-storage Patch
@powersync/service-module-mongodb Patch
@powersync/service-module-mysql Patch
@powersync/service-module-postgres-storage Patch
@powersync/service-module-postgres Patch
test-client Patch
@powersync/service-schema Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@rkistner rkistner marked this pull request as ready for review July 22, 2025 07:16
@rkistner rkistner requested a review from stevensJourney July 22, 2025 07:16
@rkistner rkistner merged commit 4ebc3bf into main Jul 22, 2025
35 of 36 checks passed
@rkistner rkistner deleted the replication-issue-diagnostics branch July 22, 2025 08:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants